package com.ruoyi.system.controllerApi;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.Income;
import com.ruoyi.system.service.IIncomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/income")
public class IncomeApiController {
    @Autowired
    private IIncomeService incomeService;

    @GetMapping("/getIncome")
    public AjaxResult getIncome(){
        List<Income> incomeList =incomeService.getIncomeSeven();
        return AjaxResult.success(incomeList);
    }
}
